import React, { Component } from 'react'
// React的事件并不是原生事件，而是合成事件
// 1.直接在render里写行内的箭头函数
export default class App extends Component {
  state = { count: 100 }
  render() {
    return (
      <div>
        { this.state.count }
        <button onClick = { () => {
          this.setState({
            count: this.state.count + 10
          })
        } }>加10</button>
      </div>
    )
  }
}
